 
require('../../assets/css/index.less')
const {
    bMenu
} = require('../../utils/dom')
require('../../assets/css/index.less')
require('../../assets/fonts/iconfont.css')
// 当前页面样式
require('./Cycling.less')
let https = require('../../utils/https.js');
let dom = require('../../utils/dom.js')
function getmeter(){
    https.get('/api/user/info',function(res){
        let {errno,data} = res;
        if(errno==0){
        dom.getEle('#gongls').innerHTML = data.meter
        }
        
    })
}
getmeter()
dom.ready(function () {
    //调用底部菜单
    dom.bMenu('motion')

    // var map = new BMapGL.Map('container'); // 创建Map实例
    // map.centerAndZoom(new BMapGL.Point(116.404, 39.915), 12); // 初始化地图,设置中心点坐标和地图级别
    // map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放

    var map = new BMapGL.Map('container'); // 创建Map实例
    map.centerAndZoom(new BMapGL.Point (104.06453, 30.54197), 10); // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
    dom.addEvent('#gots', function () {
        document.querySelector('.tiwdfs').style.display = 'block'
        timePlay();
    })
    //3、2、1倒计时
    function timePlay() {

        let num = 3;
        let timeId = window.setInterval(function () {
            let text = num--
            numbers.textContent = text
            if (text === 0) {
                numbers.textContent = 'GO'
                window.clearInterval(timeId)
                //跳转
                window.location.href = 'Inmotion.html'
            }
        }, 1000)
    }
})
